package com.kitty.game.market;

import com.kitty.common.utils.SpringUtils;
import com.kitty.game.market.message.*;
import com.kitty.game.market.model.MarketCheckResult;
import com.kitty.mina.annotation.RequestMapping;
import org.apache.mina.core.session.IoSession;
import org.springframework.stereotype.Controller;

@Controller
public class MarketController {

    @RequestMapping
    public void reqPrice(IoSession session, ReqMarketSearchItem reqMarketSearchItem) {
     //SpringUtils.getBean(MarketService.class).marketQuery(reqMarketSearchItem.getDesc(), session);
    }

    @RequestMapping
    public void rutan(IoSession session, ReqSetStallGoods reqSetStallGoods) {
        SpringUtils.getBean(MarketService.class).upShell(session, reqSetStallGoods);
    }

    @RequestMapping
    public void checkInfo(IoSession session, ReqGoodInfo reqGoodInfo) {
        SpringUtils.getBean(MarketService.class).goodsInfo(session, reqGoodInfo);
    }

    @RequestMapping
    public void gaijia(IoSession session, ReqStallChangePrice reqStallChangePrice) {
        SpringUtils.getBean(MarketService.class).updatePrice(session, reqStallChangePrice);
    }

    @RequestMapping
    public void goumai(IoSession session, ReqBuyFromStall reqBuyFromStall) {
        SpringUtils.getBean(MarketService.class).buyGoods(session, reqBuyFromStall);
    }
    @RequestMapping
    public void goodsCollection(IoSession session, MarketCheckResult marketCheckResult) {
        SpringUtils.getBean(NewMarketService.class).goodsCollection(session, marketCheckResult);
    }
    @RequestMapping
    public void noticeRecordDetail(IoSession session, GoldStallRecordDetail goldStallRecordDetail) {
        SpringUtils.getBean(NewMarketService.class).noticeRecordDetail(session, goldStallRecordDetail);
    }
}
